// Datapump that returns the length of a list
// Copyright 2006 (C) Ralph Thomas

#ifndef MISSION_DATAPUMPS_LENGTH_H
#define MISSION_DATAPUMPS_LENGTH_H

#include <adobe/array.hpp>
#include <adobe/value.hpp>
#include <adobe/adam.hpp>

namespace datapumps {
	//
	/// Create a datapump that returns the length of the list
	/// in the first position of the given array.
	///
	/// \param	array	the array containing the list to measure.
	/// \param	sheet	the sheet to resolve @references into.
	/// \return	a datapump that returns the length of the given list.
	//
	adobe::value_t make_length_datapump(const adobe::array_t& array, adobe::sheet_t& sheet);
}

#endif

